// 用来创建store和配置redux-thunk以及调试工具,以及合并reducer

import { createStore, applyMiddleware, combineReducers } from 'redux'

import thunk from 'redux-thunk'

import { composeWithDevTools } from 'redux-devtools-extension'

// 引入reducer并合并
import zsReducer from './zsReducer'
import lsReducer from './lsReducer'

const rootReducer = combineReducers({
  x: zsReducer,
  y: lsReducer,
})

export default createStore(
  rootReducer,
  composeWithDevTools(applyMiddleware(thunk))
)
